package com.esun.payment_api.controller;

import com.esun.common.utils.JWTUtils;
import com.esun.payment_api.security.model.LoginUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class BaseController {
    protected final Logger logger = LoggerFactory.getLogger(this.getClass());

    /**
     * 获取用户缓存信息
     */
    public LoginUser getLoginUser(){
        LoginUser loginUser = new LoginUser();
        try {
            return JWTUtils.getLoginUser();
        } catch (Exception e) {
            return loginUser;
        }
    }
}
